home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
telecomm
/
fnordadl
/
fn132src.zoo
/
citutil
/
conv33d.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-02
|
21KB
|
617 lines
/*
* conv33d.c -- convert STadel 3.3d system to Fnordadel 1.3
*
* 90Dec28 AA Hacked on again
* 90Sep05 AA Created.
*/
#include "ctdl.h" /* for Fnordadel definitions */
#include "net.h"
#include "log.h"
#include "msg.h"
#include "room.h"
#include "config.h"
#include "floor.h"
#include "citlib.h"
/* STadel 3.3d definitions */
/* (or reasonable approximations thereof) */
#define xORGSIZE 80
#define xMSGSPERRM 58
#define xMAXROOMS 64
#define xSHARED_ROOMS 16
#define xMAXCODE 400 /* codebuffer inside cfg */
#define xNUMBAUDS 5
/* This is from 3.4a -- is it the same as 3.3d? It's the same size... */
struct xconfig {
short maxMSector; /* Max # of sectors (simulated) */
short catChar; /* Location of next write in msg file */
short catSector;
long oldest; /* 32-bit ID# of first message in system*/
long newest; /* 32-bit ID# of last message in system*/
short dft_page; /* default pagelength */
short dft_profile; /* default profile */
short cryptSeed; /* xor crypt offset */
short sizeLTentry; /* contains size of a logTab entry */
short MAXLOGTAB; /* number of log entries supported */
/*
* system identification for users & networking.
*/
short nodeName; /* name for networking */
short nodeTitle; /* name displayed for callers */
short nodeId; /* phone number/network id */
/*
* system directory offsets in codeBuf
*/
short sysdir; /* where we keep various system files */
short helpdir; /* .hlp, .mnu, .blb files */
short msgdir; /* primary messagefile */
char mirror; /* Auto backup of message files? */
short mirrordir; /* directory to put autobackup msgfile */
short netdir; /* where net files are found */
short auditdir; /* where audit files are found */
short receiptdir; /* where sendfile stuff goes */
short holddir; /* where held messages go */
short tempdir; /* temporaries (defaults to netdir) */
short recSize; /* how many K we can recieve. */
char unlogEnterOk; /* TRUE if OK to enter messages anon */
char unlogReadOk; /* TRUE if unlogged folks can read mess */
char unlogLoginOk; /* TRUE if spontan. new accounts ok. */
char nonAideRoomOk; /* TRUE general folks can make rooms */
char noMail; /* TRUE if mail is not allowed */
char allNet; /* TRUE if all users get net privvies */
char paranoid; /* force remote callers to login */
char aideforget; /* aides can forget rooms */
char keephold; /* keep held messages between logins */
char usa; /* is this system in north america? */
char call_log; /* if > 0, keep a call-log. */
char pathalias; /* do intelligent mail routing */
char forward_mail; /* forward mail through this node? */
char noChat; /* TRUE to suppress chat attempts */
char debug; /* turns debug printout on and off */
char diskusage; /* do a df() after each directory */
char fZap; /* default flags for +zap, */
char fNetlog; /* +netlog, */
char fNetdeb; /* +netdebug */
short evtCount; /* number of events to deal with... */
short floorCount; /* number of floors to deal with... */
short zap_count; /* loop zap table size */
short netSize; /* How many on the net? */
short poll_count; /* # polling events */
short com_port; /* com port that the modem is on... */
/* (only useful for MS-DOS version) */
long poll_delay; /* idle time before polling systems */
char sysPassword[60]; /* Remote sysop */
char filter[128]; /* input character translation table */
char codeBuf[xMAXCODE]; /* strings buffer */
char shave[8]; /* shave-and-a-haircut/2 bits pauses */
char sysBaud; /* What's our baud rate going to be? */
char search_baud; /* TRUE to do flip flop search for baud */
char connectPrompt; /* prompt for C/R when connected */
short connectDelay; /* how long to wait after connect before*/
/* autobauding */
short modemSetup; /* string to set up the modem */
short mCCs[xNUMBAUDS]; /* strings for getting condition codes */
/* from the modem */
char modemCC; /* does the modem do condition codes? */
char probug; /* prometheus 2400 baud modem bug... */
short dialPrefix; /* string to prefix telephone #'s with */
short dialSuffix; /* string to append to telephone #'s */
short local_time; /* how long to wait 'til local hangup */
short ld_time; /* how long to wait 'til l-d hangup */
short shell; /* shell to execute if you do an ^LO */
short sysopName; /* user to throw SYSOP mail at. */
short archiveMail; /* archive all this users' mail */
short hub; /* for forwarding mail. */
short organization; /* descriptive field for headers */
short dft_width; /* default terminal width */
/*
* accounting variables
*/
long download; /* download limit... */
char ld_cost; /* cost to mail to a l-d system */
char hubcost; /* cost to route mail through #hub */
} ;
#define BitField(name,size) char name
struct xrflags { /* Room flags */
BitField(xINUSE,1); /* Room in use? */
BitField(xPUBLIC,1); /* Room public? */
BitField(xISDIR,1); /* Room directory? */
BitField(xPERMROOM,1); /* Room permanent? */
BitField(xSKIP,1); /* Room skipped? (temporary for user) */
BitField(xUPLOAD,1); /* Can room be uploaded to? */
BitField(xDOWNLOAD,1); /* Can room be downloaded from? */
BitField(xSHARED,1); /* Is this a shared room? */
BitField(xARCHIVE,1); /* Is this room archived somewhere? */
BitField(xANON,1); /* is this an anonymous room? */
BitField(xINVITE,1); /* is this an invitation-only room? */
BitField(xNETDOWNLOAD,1); /* net-downloadable room? */
BitField(xAUTONET,1); /* (shared room -- net all messages?) */
BitField(xREADONLY,1); /* readonly room? */
char xfloorGen; /* floor this room is in */
} ;
struct xaRoom { /* The appearance of a room: */
unsigned short xrbgen; /* generation # of room */
struct xrflags xrbflags; /* same bits as flags above */
LABEL xrbname; /* name of room */
long xrblastNet;
long xrblastLocal;
long xrblastMessage;
char xrbfill[8];
char xrbdirname[100];/* user directory for this room's files */
struct xaRmsg {
long xrbmsgNo; /* every message gets unique# */
short xrbmsgLoc; /* sector message starts in */
} xmsg[xMSGSPERRM];
} ;
struct xflTab {
LABEL xflName; /* floor name */
char xflGen; /* floor generation # */
char xflInUse; /* is this floor in use? */
char xflexp0; /* 4 expansion fields */
char xflexp1;
char xflexp2;
char xflexp3;
} ;
/* 3.4a struct: */
#define BIT(x) (1<<(x))
struct xlflags { /* Flags for person in log */
char xPROTOCOL; /* Default upload/download protocol */
BitField(xLFMASK,1); /* Linefeeds? */
BitField(xEXPERT,1); /* Expert? */
BitField(xAIDE,1); /* Vice-Grand-Poobah? */
BitField(xL_INUSE,1); /* Is this slot in use? */
char xREADING; /* options for reading messages */
#define dLONG BIT(0) /* multiline headers? */
#define dTIME BIT(1) /* print time on short headers */
#define dSUBJ BIT(2) /* print subject field */
#define dMORE BIT(3) /* pause between messages */
#define dORG BIT(4) /* print org fields */
#define dOLDTOO BIT(5) /* print last old on new */
#define dNUMBER BIT(6) /* show message numbers */
#define dFLOOR BIT(7) /* floor-by-floor display */
char xPAGELENGTH; /* for pagination */
BitField(xNET_PRIVS,1); /* do we have netprivs? */
BitField(xASKSUBJECT,1); /* ask for subject when entering mesg */
} ;
struct xlogBuffer { /* The appearance of a user: */
char xlbnulls; /* #nulls, lCase, lFeeds */
struct xlflags xlbflags; /* UCMASK, LFMASK, EXPERT, AIDE, INUSE */
char xlbwidth; /* terminal width */
short xcredit; /* Credit for long distance calls */
LABEL xlbname; /* caller's name */
LABEL xlbpw;